<template>
	<div class="g-input01">
		<el-input v-model="input" placeholder="" 
			@change="change"
		>
    	<template slot="prepend">
    		<el-tooltip class="item g-tip01" effect="dark" content="必须0.0001的整数倍" placement="bottom">
		      <span class="tip">价格</span>
		    </el-tooltip>
		    <span class="type">{{type}}</span>
    	</template>
    	<template slot="append">≈${{input}}</template>
		</el-input>
	</div>
</template>

<script>
	export default {
		name: "gInput01",
		data() {
			return {
				// input: ""
			}
		},
		props: {
			type: {
				type: String,
				default: function() {
					return '';
				},
				required: true
			},
			input: {
				type: String,
				default: function() {
					return '';
				},
				required: false
			}
		},
		methods: {
			change(val){
				this.$emit('change',val);
			}
		}
	}
</script>
